POV-Ray : Newsgroups : povray.newusers : Generating cross-section of a complicated model : Generating cross-section of a complicated model Server Time
28 Jul 2024 12:25:28 EDT (-0400)
  Generating cross-section of a complicated model  
From: Tomohiro
Date: 20 May 2009 09:05:00
Message: <web.4a13ff1fd9818dbeab6e42900@news.povray.org>
I built a model of a complicated machine. The machine consists of many
parts with different materials (for example, steel screws, copper electrodes,
ceramic insulators, glass, graphite, silicon, and so on). Thus, the parts in
the model have different textures (or pigments).

I would like to generate a cross-section of the model. Usage of "intersection"
or "difference" with a "plane" does not work well, because the texture of
the cross-section is determined by the "plane".

I thought about preparing a macro like following:

#macro X(OBJ,TEX)
  difference{
    object{OBJ}
    plane{<1,1,1>,0}  // a plane to cut the model, same texture
    texture{TEX}
  }
#end

and substituting all parts in the model with this macro. However, this does
not work because I used many "rotation"s and "translate"s to build the model.
(These "rotation"s and "translate"s are also applied to the "plane" to cut
the model).

How can I achieve my goal without modifying the model as far as possible?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.